<!-- head -->
{include file='public/head' /}
<!-- head -->
<style>
    /*transition: all 0.6s;表示所有的属性变化在0.6s的时间段内完成。
    transform: scale(1.4);表示在鼠标放到图片上的时候图片按比例放大1.4倍。*/
    div img{  
        cursor: pointer;  
        transition: all 0.6s;  
    }  
    div img:hover{  
        transform: scale(1.6);  
    } 
</style>
<!-- left -->
{include file='public/left' /}
<!-- left -->

<div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
        <h1>
            审核信息
            <small>
                {if condition="$storeList.auditstore eq 0"}待审核
                {elseif condition="$storeList.auditstore eq 2" /}审核不通过
                {/if}
            </small>
        </h1>
        <ol class="breadcrumb">
            <li><a href="#"><i class="fa fa-dashboard"></i> 店铺管理</a></li>
            <li><a href="#">审核店铺</a></li>
            <li class="active">查看信息</li>
        </ol>
    </section>

    <!-- Main content -->
    <section class="content">

        <!-- row -->
        <div class="row">
            <div class="col-md-12">
                <!-- The time line -->
                <ul class="timeline">
                    <!-- timeline time label -->
                    <li class="time-label">
                        <span class="bg-yellow">
                            门店信息
                        </span>
                    </li>
                    <!-- /.timeline-label -->
                    <!-- timeline item -->

                    <!-- END timeline item -->
                    <!-- timeline item -->
                    <li>
                        <i class="fa fa-bullhorn bg-aqua"></i>

                        <div class="timeline-item">
                            <span class="time"><i class="fa fa-clock-o"></i> {$storeList.add_time|date='Y-m-d',###}</span>

                            <h3 class="timeline-header no-border"><a href="#">店铺名称</a>  {$storeList.store_name}</h3>
                        </div>
                    </li>
                    <li>
                        <i class="fa  fa-fax bg-aqua"></i>

                        <div class="timeline-item">
                            <span class="time"><i class="fa fa-clock-o"></i> {$storeList.add_time|date='Y-m-d',###}</span>

                            <h3 class="timeline-header no-border"><a href="#">电话</a>  {$storeList.keeper_phone}</h3>
                        </div>
                    </li>
                    <!-- END timeline item -->
                    <!-- timeline item -->
                    <li>
                        <i class="fa fa-comments bg-yellow"></i>

                        <div class="timeline-item">
                            <span class="time"><i class="fa fa-clock-o"></i> {$storeList.add_time|date='Y-m-d',###}</span>

                            <h3 class="timeline-header"><a href="#">营业时间</a> {$storeList.busstarttime}-{$storeList.busendtime} ({$storeList.weekday})</h3>


                        </div>
                    </li>
                    <li>
                        <i class="fa fa-bank bg-blue"></i>

                        <div class="timeline-item">
                            <span class="time"><i class="fa fa-clock-o"></i> {$storeList.add_time|date='Y-m-d',###}</span>

                            <h3 class="timeline-header"><a href="#">店铺地址</a> <span style="font-size: 14px;color: #999999">店铺地区和详细地址</span></h3>

                            <div class="timeline-body">
                                {$storeList.store_address}
                            </div>
                            <div class="timeline-footer">
                                {if condition="$storeList.prov neq ''"}
                                <a class="btn btn-primary btn-xs">{$storeList.provname}</a>
                                {/if}
                                {if condition="$storeList.city neq ''"/}
                                <a class="btn btn-danger btn-xs">{$storeList.cityname}</a>
                                {/if}
                                {if condition="$storeList.city neq ''"/}
                                <a class="btn btn-info btn-xs">{$storeList.areaname}</a>
                                {/if}
                            </div>
                        </div>
                    </li>
                    <!-- END timeline item -->
                    <!-- timeline time label -->
                    <li class="time-label">
                        <span class="bg-green">
                            资质认证
                        </span>
                    </li>
                    <!-- /.timeline-label -->
                    <!-- timeline item -->
                    <li>
                        <i class="fa fa-calendar-minus-o bg-aqua"></i>

                        <div class="timeline-item">
                            <span class="time"><i class="fa fa-clock-o"></i> {$storeList.add_time|date='Y-m-d',###}</span>

                            <h3 class="timeline-header no-border"><a href="#">经营者姓名</a> {$storeList.store_keeper}</h3>
                        </div>
                    </li>
                    <li>
                        <i class="fa fa-camera bg-purple"></i>

                        <div class="timeline-item">
                            <span class="time"><i class="fa fa-clock-o"></i> {$storeList.add_time|date='Y-m-d',###}</span>

                            <h3 class="timeline-header"><a href="#">身份证</a> {$storeList.keeper_idcard}</h3>

                            <div class="timeline-body">
                                <img src="{:config('adminconfig.ImgPath')}/{$storeList.idcard1}" alt="身份证正面" class="margin" width="300px" height="200px">
                                <img src="{:config('adminconfig.ImgPath')}/{$storeList.idcard2}" alt="身份证反面" class="margin" width="300px" height="200px">
                                <img src="{:config('adminconfig.ImgPath')}/{$storeList.idcard3}" alt="手持身份证" class="margin" width="300px" height="200px">
                            </div>
                        </div>
                    </li>
                    <!-- END timeline item -->
                    <!-- timeline item -->
                    {if condition="$storeList.bus_licence eq 1"}
                    <li>
                        <i class="fa fa-video-camera bg-maroon"></i>

                        <div class="timeline-item">
                            <span class="time"><i class="fa fa-clock-o"></i> {$storeList.add_time|date='Y-m-d',###}</span>

                            <h3 class="timeline-header"><a href="#">营业执照</a> 
<!--                                {if condition="$storeList.bus_licence_type eq 1"}企业法人
                                {elseif condition="$storeList.bus_licence_type eq 2"/}个体工商户
                                {else/}无法提供营业执照
                                {/if}-->
                            </h3>
                            <div class="timeline-body">
                                <img src="{:config('adminconfig.ImgPath')}/{$storeList.bus_licence_img}" alt="营业执照" class="margin" width="300px" height="200px">
<!--                                <span style=" color: #00c0ef">注册号：</span>{$storeList.bus_licence_number}
                                <span style=" color: #00c0ef">营业执照名称：</span>{$storeList.bus_licence_name}-->
                            </div>
                        </div>
                    </li>
                    {else/}
                    <li>
                        <i class="fa fa-video-camera bg-maroon"></i>

                        <div class="timeline-item">
                            <span class="time"><i class="fa fa-clock-o"></i> {$storeList.add_time|date='Y-m-d',###}</span>

                            <h3 class="timeline-header"><a href="#">门头照</a> 
                                无法提供营业执照
                            </h3>
                            <div class="timeline-body">
                                <img src="{:config('adminconfig.ImgPath')}/{$storeList.store_img}" alt="门头照" class="margin" width="300px" height="200px">
                                <span style=" color: #999999">提示：克克美承诺对认证图片及信息的严格保密义务，不将认证图片及信息用于克克美平台之外的使用，请您知悉.</span>
                            </div>
                        </div>
                    </li>
                    {/if}
                    <li class="time-label">
                        <span class="bg-red">
                            短息审核
                        </span>
                    </li>
                    {volist name='smslist' id='sms'}
                    <li>
                        <i class="fa fa-commenting bg-aqua"></i>
                        <div class="timeline-item">
                            <span class="time"><i class="fa fa-clock-o"></i> {$sms.add_time|date='Y-m-d H:i:s',###}</span>

                            <h3 class="timeline-header no-border"><a href="#">短信内容</a>
                                <span style="font-size: 14px;color: #666666">
                                    {$sms.content}
                                </span>
                            </h3>
                        </div>
                    </li>
                    {/volist}
                    <li>
                        <i class="fa fa-mail-reply-all bg-red"></i>
                        <div class="timeline-item">
                            <span class="time"><i class="fa fa-clock-o"></i></span>

                            <h3 class="timeline-header"><a href="#">失败原因</a> 
                                <span style="font-size: 14px;color: #999999">审核失败填写该栏,审核通过请留空</span>
                            </h3>
                            <div class="timeline-body">
                                <form class="form-horizontal">
                                    <div class="box-body">
                                        <div class="form-group">
                                            <label for="inputPassword3" class="col-sm-2 control-label">失败原因</label>
                                            <div class="col-sm-10">
                                                <input type="text" class="form-control" id="why" value="{$storeList.why}" placeholder="请简洁明了的描述审核失败原因...">
                                            </div>
                                        </div> 
                                    </div>
                                </form>
                            </div>
                        </div>
                    </li>

                    <li>
                        <i class="fa fa-mail-reply-all bg-aqua"></i>
                        <div class="timeline-item">
                            <span class="time"><i class="fa fa-clock-o"></i></span>

                            <h3 class="timeline-header"><a href="#">发送短信</a> 
                                <span style="font-size: 14px;color: #999999">请不要发送违规内容</span>
                            </h3>
                            <div class="timeline-body">
                                <form class="form-horizontal">
                                    <div class="box-body">
                                        <div class="form-group">
                                            <label for="inputEmail3" class="col-sm-2 control-label">手机号</label>
                                            <div class="col-sm-10">
                                                <input type="text" class="form-control" id="inputphone" placeholder="手机号" value="{$storeList.keeper_phone}">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label for="inputPassword3" class="col-sm-2 control-label">短信内容</label>
                                            <div class="col-sm-10">
                                                <input type="text" class="form-control" id="inputcontent" placeholder="短信内容">
                                            </div>
                                        </div> 
                                    </div>

                                </form>

                            </div>
                            <div class="timeline-footer">
                                <a href="#" class="btn bg-maroon" onclick="SendSms()">发送短信</a>
                                <a href="#" class="btn btn-sm bg-maroon" onclick="Audit()">审核通过</a>
                                <a href="#" class="btn btn-xs bg-maroon" onclick="StoreAudit()">审核失败</a>
                            </div>
                        </div>

                    </li>

                    <!-- END timeline item -->
                    <li>
                        <i class="fa fa-clock-o bg-gray"></i>
                    </li>
                </ul>
            </div>
            <!-- /.col -->
        </div>
        <!-- /.row -->


        <!-- /.row -->

    </section>
    <!-- /.content -->
</div>
<script type="text/javascript">

    var auditstore = 2;
    function Audit() {
        auditstore = 1;
        showConfirm('审核店铺', '确认通过？', StoreAudit);
    }
    function StoreAudit() {
        var store_id = "{$storeList.id}";
        var why = document.getElementById("why").value;
        $.ajax({
            url: "{:url('Store/Audit','','')}",
            type: 'POST',
            data: {
                'store_id': store_id,
                'auditstore': auditstore,
                'why': why,
            },
            dataType: 'JSON',
            success: function (data) {
                showAlert('提示', data.msg, null);
                if (data.code == 1) {
                   window.location.href="{:url('Store/AuditStore')}";  
                }
            }
        });
    }

    function SendSms() {
        var phone = document.getElementById("inputphone").value;
        var content = document.getElementById("inputcontent").value;
        $.ajax({
            url: "{:url('Store/sendSms','','')}",
            type: 'POST',
            data: {
                'phone': phone,
                'content': content,
            },
            dataType: 'JSON',
            success: function (data) {
                showAlert('提示', data.msg, null);
                if (data.code == 1) {

                }
            }
        });
    }

</script>

<!-- foot -->
{include file='public/foot' /}
<!-- foot -->